#include "MyClass.h"

UINT numClicks = 0;


CMainWnd::CMainWnd(void)
{
	Create(NULL, L"MFC Demo");
}


CMainWnd::~CMainWnd(void)
{
}

BOOL CApp::InitInstance()
{
	try
	{
		m_pMainWnd = new CMainWnd;
		m_pMainWnd->ShowWindow(m_nCmdShow);
		m_pMainWnd->UpdateWindow();
		return TRUE;
	}
	catch(CException* e)
	{
		return FALSE;
	}
}

BEGIN_MESSAGE_MAP(CMainWnd, CFrameWnd)
ON_WM_LBUTTONDOWN()
END_MESSAGE_MAP()


void CMainWnd::OnLButtonDown( UINT nFlags, CPoint point )
{
	char txt[50];

	sprintf(txt,  "You have clicked on the form %d times", ++numClicks);

	CClientDC dc(this);

	dc.TextOut(1, 1, txt); 

}

CApp App;